package com.imoblife.brainwavestus.pad.activity;

import com.imoblife.brainwavestus.BaseActivity;
import com.imoblife.brainwavestus.R;
import com.imoblife.brainwavestus.customview.NewProductsView;

import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.os.Handler;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.ArrayAdapter;
import android.widget.Button;
import android.widget.Spinner;
import android.widget.TextView;

public class NewShopActivity extends BaseActivity {

	NewProductsView mNewProductsView;

	protected void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		
		initTitleName(getString(R.string.store));
		
		if (mNewProductsView == null) {
			mNewProductsView = new NewProductsView(this);
		}

		if (mNewProductsView.isXLargerScreen()) {
			setContentView(R.layout.tb_specials_shop_layout);
			mNewProductsView.loading();
			Button spinner = (Button) findViewById(R.id.categoryLayout);

			spinner.setText(getString(R.string.new_list));
			spinner.setBackgroundResource(android.R.drawable.btn_default);
			spinner.setVisibility(View.VISIBLE);

		} else {
			setContentView(R.layout.specials_shop_layout);
			mNewProductsView.loading();
			TextView title = (TextView) findViewById(R.id.title);
			title.setText(R.string.new_list);
		}

	}

	public void finish() {

		super.finish();
	}

	protected void onDestroy() {
		mNewProductsView.release();
		System.gc();
		super.onDestroy();
	}
}
